<?php
	
	function query($user_id,$platformNo,$post_url){
		
		
		$Sign_data = array();
		$Sign_data['mchnt_cd'] = $platformNo;// 商户编号
		
		$Sign_data['mchnt_txn_ssn'] = get_microtime();
		$user = get_user_info("*","id=".$user_id);
		$Sign_data['user_ids'] = $user['mobile'];
		$Sign_data['start_day'] = $_REQUEST['start_day'];//20120901
		$Sign_data['end_day'] = $_REQUEST['end_day'];//20120910
		
		
		ksort($Sign_data);
		foreach($Sign_data as $k => $v){
			if($k == 'start_day'){
				$Sign_old .=$v;
				$Sign_old_a .=$k;
			}else{
				$Sign_old .=$v."|";
				$Sign_old_a .=$k."+|+";
			}
		}
		
		$pSign=rsaSign($Sign_old,PRIVATE_KEY_PATH);
		
		
		$req = http_build_query($Sign_data)."&signature=".urlencode($pSign);
		
		
		$options = array(
			CURLOPT_POST => TRUE,
			CURLOPT_RETURNTRANSFER => TRUE,
			CURLOPT_SSL_VERIFYPEER=>0,
			CURLOPT_SSL_VERIFYHOST=>0,
			CURLOPT_POSTFIELDS =>$req,
		
		); 
	    $ch = curl_init($post_url); 
	    curl_setopt_array($ch,$options); 
	   	$resultStr = curl_exec($ch);
	    curl_close($ch); 
		
		print_r($resultStr);
	}
